package Month11.Day11;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;

public class T01Test {
    public static void main(String[] args)  {
        Scanner in=new Scanner(System.in);
        System.out.println("输入年份");
        Integer a1=in.nextInt();
        System.out.println("输入月份");
        Integer a2=in.nextInt();
        System.out.println("输入几号");
        Integer a3=in.nextInt();
        Calendar c=Calendar.getInstance();
       c.set(Calendar.YEAR,a1);
        c.set(Calendar.MONTH,a2);
        c.set(Calendar.DAY_OF_MONTH,a3);
        c.add(Calendar.YEAR,5);
        System.out.println(c.getTime());
        SimpleDateFormat s=new SimpleDateFormat("yyyy-MM-dd");
        System.out.println("失效日期为："+s.format(c.getTime()));


    }
}
